package com.spc.travel.agency.mvp.presenter;

import com.spc.travel.agency.mvp.iview.MainAcView;
import com.travel.lib.base.mvp.BasePresenter;

import java.util.concurrent.TimeUnit;

import javax.inject.Inject;

import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;

/**
 * Created by spc on 2017/8/10.
 */

public class MainPresenter extends BasePresenter<MainAcView> {
    @Inject
    public MainPresenter() {
    }


    public void lodData() {
        mvpView.showLoading();
        mCompositeSubscription.add(Observable.timer(3, TimeUnit.SECONDS)
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(l -> {
                    mvpView.hideLoading();
                    mvpView.getDataSuccess();
                }));
    }
}
